home *** CD-ROM | disk | FTP | other *** search
/ BUG 1 / BUGCD1996_0708.ISO / pc / util / minilin / minilin.exe / ROOT / ESOTERIC.{_C < prev    next >
Text File  |  1995-01-15  |  2KB  |  98 lines

  1. #!/sbin/dip
  2.  
  3. # Set the local and remote ends of the link.
  4.   get $local slip1
  5.   get $remote orthanc
  6.  
  7. # Set the desired serial port and speed.
  8.   port modem
  9.   speed 19200
  10.  
  11. # Set eight-bit clean comms (it's the default, but it can't hurt).
  12.   databits 8
  13.   parity N
  14.   stopbits 1
  15.  
  16. # Define the modem initialisation string.
  17. #  init AT&F&K3&D2&C1&S1%C2
  18. #   init ATZ
  19.  
  20. # Turn on echoing of the control commands, responses etc.
  21.   echo on
  22.  
  23. # Reset the modem and terminal line.  NB some people report having 
  24. # problems dialing after using this.  It also slows down the login.
  25. # Uncomment the next three lines if you need to reset the modem here.
  26. # reset
  27. # wait OK 10
  28. # if $errlvl != 0 goto error1
  29.  
  30. top:
  31.  dial 7165651
  32.  
  33.  
  34. # Check to see if all is OK.
  35.   if $errlvl != 0 goto error2
  36.  
  37. # If we get a successful CONNECT, go on to the login section, else retry.
  38.   wait CONNECT 60
  39.   if $errlvl == 0 goto login
  40.  
  41. # Retry.  This does not limit the number of retries.  It is for manual 
  42. # operation only!  This reset may also disrupt dialling on some modems.
  43. # Uncomment the next three lines if you need to reset the modem here.
  44. # reset
  45. # wait OK 3
  46. # if $errlvl != 0 goto error1
  47.   print
  48.   print Trying again ...
  49.   sleep 30
  50.   goto top
  51.  
  52. login:
  53. # We are now connected.  Log in to the system.  You should not normally 
  54. # need to provoke the login prompt with the next two lines.
  55. # sleep 3
  56. # send \r\n\r\n
  57.   wait ogin: 60
  58.   if $errlvl != 0 goto error3
  59.   sleep 1
  60.   send slip\n
  61.  
  62. # This route is the default route.  The mtu must match the mru above.
  63.   get $mtu 296
  64.   default
  65.  
  66. # Announce the connection.
  67.   print
  68.   print CONNECTED via $remote with address $rmtip
  69.  
  70. # Make a compressed SLIP connection.
  71.   mode CSLIP
  72.   goto exit
  73.  
  74. # Error handling section.
  75. error1:
  76.   print Error resetting modem - OK not received.
  77.   goto error
  78. error2:
  79.   print Error in dialling.
  80.   goto error
  81. error3:
  82.   print Error waiting for login prompt.
  83.   goto error
  84. error4:
  85.   print Error waiting for password prompt.
  86.   goto error
  87. error5:
  88.   print Error waiting for protocol prompt.
  89.   goto error
  90. error6:
  91.   print Error waiting for HELLO prompt.
  92.   goto error
  93. error:
  94.   print SLIP failed.
  95.  
  96. # Exit ...
  97. exit:
  98.